#include<stdio.h>

int main(int argc,char *argv[])
{
	char buf[100] ={};
	int res = 0;
	
	if(argc!=3){
		printf("Usage:%s srcpath destpath\n",argv[0]);
		return -1;
	}
	
	FILE *fpr = fopen(argv[1],"r");
	if(!fpr){
		perror("fopen");
		return -1;
	}
	FILE *fpw = fopen(argv[2],"w");
	if(!fpw){
		perror("fopen");
		return -1;
	}
	
	//从src中读一个字符 ，写到dest中，直到文件末尾
	while(res = fread(buf,1,100,fpr))
		fwrite(buf,1,res,fpw);
		
		
	fclose(fpr);
	fclose(fpw); 
	
	
	
	
	return 0;
}